﻿<UserControl x:Class="Twitter.TwitterWidget"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:Properties="clr-namespace:Twitter.Properties"
             Background="#053565" MouseLeftButtonUp="UserControlMouseLeftButtonUp">
    <UserControl.ContextMenu>
        <ContextMenu>
            <MenuItem Name="RefreshItem" Header="{x:Static Properties:Resources.RefreshItem}" Click="RefreshItemClick"/>
            <MenuItem Name="OptionsItem" Header="{x:Static Properties:Resources.OptionsItem}" Click="OptionsItemClick"/>
        </ContextMenu>
    </UserControl.ContextMenu>
    <UserControl.Resources>
        <Storyboard x:Key="TileAnim">
            <DoubleAnimation Storyboard.TargetName="ForegroundGridTranslation" Storyboard.TargetProperty="Y" From="0" To="-20" Duration="0:0:0.18" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
            <DoubleAnimation Storyboard.TargetName="ForegroundGridTranslation" Storyboard.TargetProperty="Y" BeginTime="0:0:0.18" To="0" Duration="0:0:0.14" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
            <DoubleAnimation Storyboard.TargetName="ForegroundGridTranslation" Storyboard.TargetProperty="Y" BeginTime="0:0:0.32" To="-10" Duration="0:0:0.12" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
            <DoubleAnimation Storyboard.TargetName="ForegroundGridTranslation" Storyboard.TargetProperty="Y" BeginTime="0:0:0.44" To="0" Duration="0:0:0.10" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
        </Storyboard>
    </UserControl.Resources>
    <Grid ClipToBounds="True">
        <Grid Name="ForegroundGrid">
            <Grid.RenderTransform>
                <TranslateTransform x:Name="ForegroundGridTranslation"/>
            </Grid.RenderTransform>
            <Grid.Background>
                <LinearGradientBrush StartPoint="1,0" EndPoint="0,0">
                    <GradientStop Color="#054f98" Offset="0"/>
                    <GradientStop Color="#064380" Offset="1"/>
                </LinearGradientBrush>
            </Grid.Background>
            <DockPanel Margin="10,10,10,20">
                <Image DockPanel.Dock="Left" Name="UserPic" Width="100" VerticalAlignment="Top" Margin="0,18,0,0"/>
                <StackPanel Margin="10" VerticalAlignment="Top">
                    <TextBlock Name="Username" Foreground="White" FontSize="24" TextTrimming="CharacterEllipsis"/>
                    <TextBlock Name="Tweet" Foreground="White" FontSize="14" MaxHeight="90" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"/>
                </StackPanel>
            </DockPanel>
            <TextBlock Name="Tip" Text="{x:Static Properties:Resources.Tip}" Margin="10" Foreground="White" FontSize="14" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"/>
            <TextBlock Name="UnreadCount" Text="0" Foreground="White" FontSize="14" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,10,10"/>
            <TextBlock Text="Twitter" Foreground="White" FontSize="14" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="10"/>
        </Grid>
    </Grid>
</UserControl>
